package com.yanqu.road.server.cmd.player;

import com.yanqu.road.pb.activity.BusinessReunionProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;
import io.netty.channel.ChannelHandlerContext;

/**
 * @author ：zfr
 * @date ：2022/4/19 11:48
 */
@Cmd(code = CrossProtocol.C_CROSS_RECALL_BIND_RESP, desc = "召回绑定返回")
public class CrossRecallBindRespCmd implements Command {
    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        BusinessReunionProto.WriteRecallCodeRespCrossMsg respCrossMsg = BusinessReunionProto.WriteRecallCodeRespCrossMsg.parseFrom(packet.getBytes());
        YanQuMessage message = YanQuMessageUtils.buildMessage(GameProtocol.S_CROSS_RECALL_BIND_RESP, respCrossMsg);
        MessageHelper.sendPacket(respCrossMsg.getRespServerId(), respCrossMsg.getRespUserId(), message);
    }
}
